#ifndef GAMEBACKGROUND_H
#define GAMEBACKGROUND_H

#include <QGraphicsPixmapItem>
#include <QPixmap>
#include <QGraphicsScene>
#include <QGraphicsSceneMouseEvent>
#include <QPointF>

#include "gameitems.h"

class GameBackground : public QObject, public QGraphicsPixmapItem
{
    Q_OBJECT

public:
    GameBackground(QGraphicsScene * scene);
    GameBackground(QPixmap pixmap,QGraphicsScene * scene);

    void setSpeed(qreal x, qreal y);
    qreal speedX();
    qreal speedY();
    void advance(int phase);

signals:
    void backgroundClicked(QPointF point);

protected:
    void mousePressEvent(QGraphicsSceneMouseEvent *event);

private:
    qreal xSpeed, ySpeed;
};

#endif // GAMEBACKGROUND_H
